<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter Tutorial
 *
 * @package		CodeIgniter
 * @author		Thinh Hung
 * @copyright	
 * @license		
 * @link		
 * @since		
 * @filesource
 */

class MY_Frontend extends CI_Controller
{
 
    var $data = array();
    function __construct ()
    {
        parent::__construct();  
        //Config for language
		@session_start();
		//if (empty($_SESSION['LANG']) && !isset($_SESSION['LANG']))
        if (!$this->session->userdata('LANG'))
		{
			$_SESSION['LANG'] = "en";
            $this->lang->load('en','english');
		}
		$uri_seg = $this->uri->segment(1);
		if ($uri_seg != 'language.html')
		{
			$_SESSION['last_url'] = current_url();
		}      
        //End config for language
        
        $this->load->model('type_tour_model');
        $this->data['trans_vietnam_tour'] = $this->type_tour_model->get_by_zone(1);        
        $this->data['daily_excursion_trip'] = $this->type_tour_model->get_by_zone(2);         
        $this->data['foreign_tour']=$this->type_tour_model->get_all();
        
        $this->load->model('zone_model');
        $this->data['zones']=$this->zone_model->get_all();
        
        
        $this->load->model('zone_hotel_model');
        $this->data['zone_hotel']=$this->zone_hotel_model->get_all();
        
        $this->load->model('link_model');
        $this->data['link']=$this->link_model->get_all();
        
        $this->load->model('supportonline_model');
        $this->data['supportonline_yahoo']=$this->supportonline_model->get_by_type();
        $this->data['supportonline_skype']=$this->supportonline_model->get_by_type(1);       
        
         
        $this->load->library('layout');
        $this->layout->setLayout('layout/template');
    }
}

/* End of file MY_Frontend.php */
/* Location: ./application/libraries/MY_Frontend.php */